package com.itheima.mapper;

import com.itheima.pojo.Setmeal;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

/**
 * @author Encounter
 * @date 2024/10/05 13:47<br/>
 */
@Mapper
public interface SetmealMapper
    {
        /**
         * 插入套餐
         *
         * @param setmeal 套餐
         */
        void insert(Setmeal setmeal);
        
        /**
         * 查询
         *
         * @param map 查询条件
         * @return {@link List }<{@link Setmeal }>
         */
        List<Setmeal> query(Map<String, Object> map);
        
        /**
         * 修改套餐表
         *
         * @param setmeal 套餐
         */
        void update(Setmeal setmeal);
        
        /**
         * 删除由id
         *
         * @param setmealId 套餐id
         */
        @Delete("delete from t_setmeal where id = #{setmealId}")
        void deleteById(Integer setmealId);
    }
